home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: netcom.com!brianr
- From: brianr@netcom.com (Brian Rankin)
- Subject: How to bind to an IP address?
- Message-ID: <brianrDKKLA1.2J2@netcom.com>
- Keywords: IP address bind Unix port
- Organization: Overseas Unix Support
- X-Newsreader: TIN [version 1.2 PL1]
- Date: Tue, 2 Jan 1996 20:08:25 GMT
- Sender: brianr@netcom22.netcom.com
-
- My Sparc-Solaris2.4 box has two IP addresses - it's "real" address (assigned
- during installation) and an additional "secondary" IP address. Multiple IP
- addresses were needed for another purpose; the machine can be accessed from
- the Internet via either IP address. The secondary address is a vaild IP
- address that the NIC understands.
-
- For you Solaris folks, all I'm do is this command:
- ifconfig le0:1 198.49.xxx.x up
-
- OK:
- I need to write a C program that listens to port 8001 on the "secondary"
- address. I've written the program and it works fine, but it's listening
- to the "real" IP address...how do I tell the program to listen to
- the secondary IP address? Any information gratefully appreciated.
-
- Sincerely,
-
- Brian Rankin
-
-